Improvements to script generator window.

* Button to re-generate script. You could do this by modifying the regex but I think this is clearer.
* More consistency in generated white space.
* Textarea instead of pre to make it easier to select content using ctrl+a.