Test: Custom cwd test for #1771.