Further improvements to script error outputting.
Fix a bug where some context menus would be clipped by the viewport.
Comment out some debugging code.
Add groundwork for the packaging tool.

The main part of this commit is adding support for non-file editors such as the packaging tool and later on settings tools.