Building path tree works, but slow.

Javascript isn't as fast as I thought. Might have to pursue other
strategies. The intent was to build a tree of all possible paths, and
find the shortest winnable path, but I may have to find a way to discard
the superfluous.