Hexlify fix for python3

Hi,

this pull req fixes tests for py32 and py33.

Hexlify is separated into utils.