Fix test isolation.
Merge pull request #4 from stojg/rm-global-state2

Fix test isolation.