testsuite.py: proper join() of threads

The previous code was taken from a snippet on a blog, but now, join()
returns always None. So the waiting was not working at all.