Fix issue #7.
Ensure tempfile cleanup even with error abort.