Fix app.tar.gz upload with a folder inside

This is ready to be merged.