make GitRepo.empty() work correctly when there is no master branch

Also include test cases to expose the issue.

Issue #41