support specifying a cwd.