Updated to support Perl on Windows

waitpid() is required because otherwise Perl on Windows might fail after 64 or 128 tests.
removing '\r' from both test output and generated output enables both spec.txt and the generated results to contain Windows newlines (\r\n).