Add a proper optimize mode and fix some gulp.clean bugs