Add branch check

Check if $1 exists, if so $1 is the branch, if not, prompt for the branch

Change-Id: I9f2f26694e5dc1b33e8d4d126e1d68e642e409bb