Allow cwd to be specified