use magic on application/octetstream' attachments

Some versions of AppleMail apparently send out attachements
with incorrect mimetypes "application/octetstream"
(instead of "application/octet-stream").
This patch makes alot use libmagic on the attachments content
to determine the actual content type.