A rapist who targeted young girls he was babysitting has been jailed for six years at the High Court in Glasgow.