Add a convenience method to see if a branch exists, with tests