Handle files with the same name as revisions.

Before this change diffing a file with the same name as a branch would
fail because git found the name ambiguous.

See #210.
Add tests for ambiguous filenames.