Ensure the io is created before the thread

There was an odd failure of this test:
https://travis-ci.org/jonleighton/spring/jobs/12755629

I'm not sure if this will help, but it seems sensible anyway.
Allow configuring default rake task environment

Fixes #180