testWithExceptions

Make sure we close open files, delete temp files, etc., on exception