A man accused of abducting and raping a child has appeared in court.