dump: support gzipped and atomic output