Better cleanup of attachments in testing.