Fix race in test.
Merge pull request #631 from howbazaar/fix-envuser-race

Fix race in test.