Changes to use hexutils.to_hex() to fix the trailing 'L' problem when
formatting strings with hexadecimals. Related to commit
b57abb694f59cdcfee3aacebed1ee05518b52c33