Fix num_frames in file_append on bigendian systems

num_frames was being incremented and then written directly to the file, which
resulted in the wrong value being written on bigendian system.  This fix created
a new variable in ptw_file_append which could safely have its endianness
swapped, then written to the output ptw file.