Added endianness CPU check

Small endianness check for correct file input / output.