Store stdout/stderr on a class/output file basis rather than the stdout/stderr from the entire test suite execution.

This changes the behaviour from storing all the stdout/stderr for the entire execution of the test suite to storing the output for each test class/output file.