Improve Javascript file generation script.