Update PathFinder.js

by using and checking the last paths the path finder gains better performance.

1600 by 1600 searches that once tool 45 seconds now takes 12 to 10 seconds.