Add :chdir support for `exec` and `spawn`

Rework the option processing, and add support for `:chdir`. Note that we are only dealing with fire-and-forget `exec` and `spawn`.