Output escape codes in hex instead of decimal.

For characters that need to be escaped, this produces a smaller more
legible escape code, and Unicode chars are generally described in hex,
not dec.