Fix parsing of named branches.

The output of git branch appears inconsistent across machines or git
versions. We should now parse the command output properly even if the
number of whitespace characters changes.