Changed path deque to stack

Changed the data structure holding the maze path from a deque to a
stack.

Instead of pushing a node on entry and popping when it’s determined to
not be part of the path, now push only when a node is known to be part
of the path. (This reduces the number of nodes created.)