Move populate_tiles to rank 0's output file creation block.
Remove unused endian.h header include.