Added cwd option for programmatic mode
Added cwd test file
Merge pull request #667 from TSLEducation/master

Added cwd option when in programmatic mode