gzipping rather than zipping export metadata.
minor changes and cleanup.