Validate git dir when getting local repo