Minor cleanup S4 class git_repository validity function