Move python 2 and 3 differences into classes.
python version specific string encoding methods.

Handle incoming and outgoing messages differently in python 2 and 3.
Initialize MockWeechat saved_state.
Remove unneccesary bytes() call from Assembler.

Add more tests for Assembler.
Remove u'' in IRC_SANITIZE_TABLE.

Not needed because of import unicode_literals.
Add doc string for test module.
Add space after commas.
Must pass bytes to potr context.receiveMessage()
Add test for generation of key file.

The weechat config directory in mock weechat is now a real directory.
Its contents will be snapshotted and restored before each example
with the rest of the weechat mock.
Add __repr__ to IrcContext for easier debugging.
Add test for session initiation.
Fix indentation.
Pass --work-tree to git so dirty is correct.
Use dict.items() instead of dict.iteritems().

iteritems was removed in Python 3.
Convert assembler value to bytes when checking if done.

potr.proto.OTRTAG is bytes and must be converted to be passed to
startswith on Python 3.
Make infos an attribute so it can be changed in tests.

Add server,nick2 key.
Add test that sets up and uses an OTR session.
Add to_bytes() for cases where bytes are always needed.

On python 3 when calling potr, bytes objects (not strs) are required.
Make all the places that do this conversion call a single function.
fix non-ascii chars in command arguments

this reverts part of 95460bdec843b9f63d2577b7093cc06e592f44a6
to avoid a UnicodeEncodeError in shlex
Merge pull request #63 from tribut/utf8-commands

fix non-ascii chars in command arguments