Fix bug in printing scalar values.
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.

giuliojiang/gvki,mc-imperial/gvki,mc-imperial/gvki,giuliojiang/gvki,giuliojiang/gvki,mc-imperial/gvki