Added cwd option when in programmatic mode

Morning, this PR simply adds the ability to pass cwd in when using PM2 programmatically.  Tests also updated and pass.