KTEST: Issue #96: multiple results directories
fix a bug in multi-threaded code
close the stream after we're done with it
small cleanup in maude backend
close stream, print stack traces instead of ignoring the exception