Fix for issues with piped output on Windows and latest versions of node.