Began work on safe file io.

Added a <Scripts> tag to the scene file which allows a single instance of a script to run and execute directly. The script is also accessible through every other script.

Various fixes.