RepairAttachments

This function should find attachments in the database that no longer exist and clear them, and fix filesize issues.