* Replaced an fputs call with an fwrite call.
* Fixed a bug where the first rank attribute name for a rank line would be
  written out repeatedly due to lack of iteration.