Writes the contents of the heightmap into the file. @throw IOException An I/O exception occurred. Possibly the file could not be written.