correctly passes the environment to child procs

This fixes a problem where child processes were inheriting the parent's environment and not the environment configured in setup. Spawn's third argument takes an object with an env property.