Add support for identifying a git detached head
Re-adding .git detection.  Didn't realize it would fatal.
Removing debug changes
Check the length of current_branch.  If set, use that.
Merge pull request #3 from borkweb/support-headless-branch

Add support for identifying a git detached head