The tests output is written as UTF-8, but run_tests.py read it with the
locale's encoding. On Windows (cp1252) a non-ASCII character crashed the
reader thread with a UnicodeDecodeError, and the run ended with "Timeout:
output is frozen." instead of the test results.
- Open all files as UTF-8, matching how UnitTesting writes them.
- Reconfigure stdout to UTF-8, since it uses cp1252 when piped on Windows
and printing the output would fail next.
- Make the reader thread a daemon, so that an error in the main thread
doesn't leave the process hanging.