Script_Editor: Save preferences

Broke out save preferences from previous Script_Editor pull request. This also contains emulatedTabs because emulated tabs because emulated tab preference is saved as well.