reverted MREAD-MAGIC and MWRITE-MAGIC to use single-byte input/output: makes it easier to reliably detect files with opposite endianity