fix execution of merge-base and remove extraneous newlines

`commands.getoutput()` runs 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'.