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'.
Merge pull request #1310 from socantre/patch-1

fix execution of merge-base and remove extraneous newlines