Fix regex for determining branches in Git