os.write should receive bytes instead of str. Fixes small Python3 OpenBSD bug.