Handle strings so tests pass on Python 3
Use binascii to hexify these bytes

since there's no bytes.encode() in Python 3.