Clean up env var handling

- Rename. We use unix sockets not pipes.
- Removed useless variables.
Write spawn socket to XDG_RUNTIME_DIR if set