fix execution of git merge-base and remove extraneous newlines

commands.getoutput was producing an error message "'{' is not recognized as an internal or external command," I assume it was trying to run the command in a subshell using sh syntax, which is not valid in a cmd.exe shell.

The whole script should probably be converted to 'subprocess'

Also `if baserev != oldrev:` was failing due to the newline printed after the revision number by the command 'git merge-base'.