This fixes an issue where trying to save a script without a title causes the script editor dialog to fully lock up. It also prevents any unexpected closing of the dialog if there is an issue saving the script.