Account for char possibly being unsigned

This sounds rather insane to me but I've managed to show that `(char)
-1` is converted to 255 on some platforms. This was reproduced on
ppc64el via Qemu on OS X. A simple program that does `fprintf(stderr,
"%d\r\n", (char) -1);` prints 255 to the console. Rather than rely on
the signedness of a char I've just updated things to use an unsigned
char (which hopefully is never signed) and replaced -1 with 255 for the
sentinel value when converting hex values.

Thanks to Balint Reczey (@rbalint) for the report.

Fixes #74