Fix debugger close button and script editor "Show Debugger"
Created by: ghost
Now the script debugger will close when pressing the close button, and the script editor "Show Debugger" will be checked when the debugger show up. This way the debugger can be easily closed when using the "Keep Debugger Open" option.
And fixed a small typo.