Saving message attachments with message.

Also added a couple of tests for it.