Spec GitRepo#current_branch for when the HEAD is detached.
Use git plumbing in GitRepo#current_branch instead of reading .git/HEAD.

Thanks to @rich0H for advice on this.