fix output bug when minify throws an exception

problem: `result` would be `undefined` if `uglify.minify` throws an exception and it would throw exception when try to access `result.min` and such as.

resolve: add `result` check after `uglify.minify`.