Fix child path preprocessing so that it finds the right script when
"cwd" was set.