Test suite bug fix - the GUI tests now cleanly terminate the interpreter thread.
This allows the test suite to terminate normally. With different Python versions on different
operating systems, this could sometimes cause the test suite to freeze at the end, the final
printout to be missing, or other strange behaviour.