Headless repos now handled properly.

The test for headless now works, plus, we don't call get_branch()
twice for no reason.
Merge pull request #73 from ccstolley/fix_headless_repo_check

Headless repos now handled properly.