Bug fixes and more options for SCons integration.

Fix definition of PYTHONPATH. Add ability to run simulation.