run-tests: Dump output of failing tests to files again.

This was a long-standing regression from converting script from sh to python.