Add runInEnvironment function.

Update readme with info about runInEnvironment.