Fix deployment script's logic for figuring out the current branch