fix stderr test output printing in Py3