Add a reverse method in Path.