Adapt script for generating archives

Use tar.gz again, to preserve file/folder permissions
(important for cache folder; without this, the user
has to chmod it by himself, which sucks...)