Prevent errors when trying to create a branch that already exists

I was occasionally getting an error when resolving dependancies that used a sha saying a branch already existed. This just adds an additional check before adding the createBranch option.