Fix most of python3 incompatibilities

Signed-off-by: Tomas Hozza <thozza@redhat.com>