Allow testsuite to pass on big endian

Move the progs header and body byteswapping into util functions and
call those functions when either reading or writing the progs.
Tweak for coding convention
White space tweak
Merge pull request #142 from CurrentResident/big_endian_testsuite

Big endian testsuite