Fix converting bytearray to hex on Python 2.6

In py26 it's not possible to pass a bytearray directly into hexify
so convert it to bytes first before passing it in.