Modified scripts: download dependencies carefully.
Modified scripts: download dependencies carefully.

Rearrange the "dependencies modified" code to take the possibility of download failure into account.  Don't remove existing files until all new ones have been downloaded successfully, then rearrange everything in place.

Fixes #1661

HasClass0/greasemonkey,Martii/greasemonkey,Ventero/greasemonkey,Ventero/greasemonkey,the8472/greasemonkey,Martii/greasemonkey,the8472/greasemonkey,HasClass0/greasemonkey