Fixing a bug in the stdout-stderr workaround for auto_test.py