Sort shortest_path output

The actual ordering of the output of the shortest path generator
doesn't matter, all that matters is the set of paths that is output.