fix race condition in testStdOutErr and align with testStdOut, again
Merge pull request #1 from HBehrens/patch-1

fix race condition in testStdOutErr and align with testStdOut, again