Fix the wrong base path bug when there is cwd in JSON app declaration

When there is a cwd key in JSON app declaration, the script file path should be relative to the cwd key in the JSON file rather than process.cwd(). and so as the watch directories.