Trigger a save when scripts are cleaned up

This fixes a slightly annoying bug where if the only change you have made is cleaning up your scripts, you have to do something else to get a "Save now" button or to trigger an autosave, or you have to find Save now in the menu.