def write_index(self):
        """Write the index of all our files to the MAR file."""
        self.fileobj.seek(self.last_offset)
        index = index_header.build(dict(entries=self.entries))
        self.fileobj.write(index)
        self.filesize = self.fileobj.tell()
Write the index of all our files to the MAR file.