Fixed #176: Error posting with attachments for messages, which have
non-latin characters.
Fixed #127: Exception while sending attached document.