add tests that allow the csw server to close before moving on
Merge pull request #2 from usgin/test-hang

Fix tests so that CSW subprocess finishes. Fix #1