Add support for big-endian platforms (fixes #9)
Also fixes undefined behavior due to pointer type-punning (a strict aliasing violation) in the unit tests.
There are many different ways to go about this, and a lot of room for personal preferences. This merge request demonstrates one implementation that I believe to be correct. The unit tests pass on both big-endian and little-endian platforms.