Python 3 compatibility ensured.

Basically, when receiving byte strings, we should always decode them.