Render byte[] properly in the cli

We recently noticed that the cli doesn't render byte[] properly (reported in #1663). This patch fixes that.
Pass the byte array into `formatHexDump()` and do the to-hex conversion there.