Python 3 compatibility fix.

The keys from the dictionary returned by `hgetall` are byte arrays
and not strings.