Correctly capture command line output from external programs on Windows.