Added wait handle to script interpreter for async waiting for a script to finish.