Fix issue where we reach root directory with no .git