Fix bug where an output dir might be emptied for no reason
Stop using deprecated uglify-js2 package