fix getting git-dir (issue #4)