Fixed get_git_dir method in case using a relative path as repository root.