Force encode_string to return a string and not bytes.

This is required to actually send a message with a binary attachment
because the email.generator module from the standard Python library
expect the parts of a multi part message to be strings, not bytes.

This can be reproduced with the modified test TestMailer.test_send

This patch also fix two tests that would fail after the change in
the encode_string function.