Revealing mistake: In the first shot of the scene where Emma and the others arrive in Storybrooke in their cars, on the left side of the screen, you can see a sign behind a branch. It says "Steveston Museum and Visitor Centre." Steveston is the name of Canadian town which doubles as the town of Storybrooke on Once Upon a Time. (00:07:00)
Continuity mistake: When Mary Margaret gets thrown by the Lily dragon into a rock, her blood smear on her head is large and messy. They cut away and cut back to her quickly and it is nice and neat with two blood drop lines slowly forming away from the cut. (00:44:00)
Answer: He knows who she is because he knows that the fairy tales are true. He was also shown to sneak out to go see Emma or someone else. Sometimes he succeeded, sometimes he didn't. This is how he knew to look for her despite his strict mother.