tar-tree: Use write_entry() to write the archive contents