Fix pathspec error on current branch checkout

Try to checkout the current branch. You check for the `*` starting the current branch name but fail to remove it from the branch name to be passed onto the git process.