Corrected endian checking, made EndianUtils tests more robust.¹

1: Wow. Such a failure. I like how the preprocessor skipped the
whole block when it found false. Stay safe, kids: don't ever
use the preprocessor.