bfs bugfixes #564 & #571; improved path tests