Fix error when gitfs file hash does not yet exist

This repeats the fix done in 46d58dc for the gitfs backend.
Fix exception while fetching new gitfs remotes

This fixes a bug caused by one of GitPython's innumerable asserts failing
upon fetching a new remote, causing an exception which interrupts the
fileserver update.
Merge pull request #6901 from terminalmage/gitfs-fixes

Gitfs fixes