The reproducers' working directory is set to the current working directory when
they are initialized. While this is not optimal, as the cwd can change during a
debug session, it has been sufficient so far.
The current approach doesn't work for the API test suite however because dotest
temporarily changes the directory to where the test's Python file lives.
This patch adds an API to tell the reproducers what to set the CWD to. This is
a NO-OP in every mode but capture.