add gzip support

Also, fix some problems with download directories, and sort
new files to download.