Adds ability to get paths ignoring direction (treating graph as undirected).