A “vile” paedophile and rapist who abused two girls from North Yorkshire has been jailed for 20 years.