Be compatible with Python 3.x

A couple of changes had to be made, especially concerning iterators vs. lists
and bytes vs. strings, two of the major changes in Python 3.x. Some issues
could be resolved using six as compatibilty library. Therefore, this was
introduced as a dependency.