perform a complete copy of the environment for sandboxed scripts