The test system depended on the shebang to locate the python
interpreter. However, this is not a portable system. Instead, prefer
to explicitly search for the interpreter prior to the execution. This
enables supporting execution of the script support on all platforms. A
secondary change of the printed string is required for Windows. Python
will replace `\n` with `\r\n` resulting in `\r\n` being emitted as
`\r\r\n` on Windows breaking the expectations on the receiver. Adjust
this by explicitly writing out a binary string to the raw underlying
buffer to avoid the translation.