Tweak Windows version of getoutput to match Unix better