Good catch — addressed in 12bacdf09 by wrapping the `spawn` call in a `try/catch` that calls `cleanup()` and `reject(err)`, so the temp dir is removed if spawn throws synchronously (e.g. invalid options). New test `rejects and cleans up when spawn throws synchronously` covers it.
