A ‘dangerous’ sex offender who broke into a Huddersfield home and was caught by police sexually assaulting a child in their bedroom, has been jailed.