Add test to detect and change code to correct endian issue
Merge pull request #63 from peter-conalgo/endian-fix

Fix an endian issue