Fix session handle tests so that multiple copies of the test can run
at the same time.