Improving the add-ons generator to deal with apps (bug 1080145)

Cancel and replace PR#320
Why save first in a temp location, and then again in the media path?