Fixed Dijkstra to not correctly select the next node to visit (fixes #12)

 - Added unit test to find issue
 - Added debug log switching to Dijkstra and JSON reviver/replacer for runtime performance