Added ability to add python script to the simulation.
1. Fixed a bug where if you had an exception in the python stuff it was treating it as a fatal error and shutting down the application.
2. Fixed a bug where the python script objects were not getting removed correctly.