Save chunks to directory.