Properly shut down the interpreter when the Script object is being destroyed.