Fix filename parsing when git filenames include spaces.

This is not perfect, but this should fix 99% of the cases. This will still show
incorrect filenames if path looks like /path/to b/your/file, but hopefully that
should be pretty rare..

Testing Done:
Tested with the dev server.

Fixes bug 3558.

Reviewed at https://reviews.reviewboard.org/r/6466/
Merge branch 'release-2.0.x'