Backward traversal

I noticed that the number of transfers wasn't being computed correctly for backward traversals of graph paths, so I changed the test to be more thorough and uncovered another bug that way. I fixed them both.