Solving Physics Puzzles by Reasoning about Paths