Uses shellescape for serializing options for `env`

Prevents environment variables containing quotes from breaking
commandlines when shelling out.