add chdir support, flatten code, update README

Added support for a 'chdir' key to change the working directory
before launching the process.

Removed openFile in favor of clarity.

Update the README.md to mention chdir and add some notes.