Fixed scripts to allow them to be run with an arbitrary CWD.