Call Git to find the .git dir instead of just guessing

Thanks to Quentin via Disquss for the tip.