child_process: copy spawnSync() cwd option to proper buffer

The `spawnSync()` `cwd` option was being copied to the incorrect location. This PR copies to the correct location. Closes #7824