Fixed a bug with hexstrings in Python3.

Thanks to Matthias Kuehlewein.
Added hexstring checks to the list of regression tests.