patch to save javascript file in the output directory

patch to save javascript file (generated by -csp) in the directory speci...