Dual Python 2 and 3 port for the “runxlrd” script

Used “2to3” for inspiration. Use “timemachine” module to keep using xrange()
under Python 2.
Fix Python 3 port in hex_char_dump()
Don’t use assertIsNotNone(), not present in Python 2.6

It was only added in 2.7.
More fixes for sorting items from dictionaries
Another relative import fix
Meant to be a byte string of unknown encoding in this case