Fixes #506. Work correctly with local git repositories.
Merge pull request #531 from wibblymat/issue-506

Fixes #506. Work correctly with local git repositories.