Make setup_git_env() resolve .git file when $GIT_DIR is not specified