regrtest.py: call replace_stdout() before the first call to print()

print("==  ", os.getcwd()) fails if the current working directory is not ASCII
whereas sys.stdout encoding is ASCII.
1 file changed