Added function that returns path between two nodes.