Make upload ignore cache files and fix unpacking bug in download.