Editor can now save a runnable script.

It's a bit of a mess at present, and likely to change quite a lot in
future. But it works!