Fix Unicode-related crash in model.py

Fixes #251

Signed-off-by: Matěj Cepl <mcepl@redhat.com>