Only replace the attachment if the part has been copied; bugfix for issue #291
Removed forced UTF-8 declaration