Fix tests that were backwards on big endian machines. Thanks to Lars Viklund for testing on three different big-endian systems.