Fix branch list to use plumbing commands

Fix the acquisition of current branch and branch list to no longer use
`git branch` but use the appropriate plumbing commands (`git symbolic-ref` and
`git for-each-ref`) instead.