Better support for running a script and the GUI from the command line.
The script is now run at the very end, after all of the GUI is set up, and is run with a wx.CallAfter call.
Authored by: bugman 2011-09-14
Parent: [r14635]
Child: [r14637]