Fix UploadWizard's config variables

makeVariablesScript and addScript put the variables too late in the page
to be useful to most of our modules. Fixed.

Bug: 48091
Change-Id: Ia09ace5dc985524634ee2c225207ee5050a046c2