When renaming attachment files, keep file extension if not provided
Properly revert attachment renames if they fail