Updated tests so they'll pass with python3

Changed hex encoding to use binascii