Only flip byte order on writes if big endian.

Fixed #87, again.
Merge branch 'master' into next