Bug fixes and enhancements.

Fixed bug where text was lost when alt-tabbing off the script dialog.
Fixed line number display on the script dialog.
Minor UI changes.