(Clone Detection) Clean up temporary files during exceptions

This is done in a way that doesn't interfere with debugging.  We don't
do it by catching and rethrowing the exception.