Fix bug in printing scalar values.

* We would print the bytes in the wrong order
  because we're usually on little endian.

* We wouldn't print bytes correctly. Casting the char
  to an int seems to fix this.