Fixed CWD bug and improved error handling

Fixed the missing options in _fixFiles, also made the cwd option
optional.

Hook up the strerr for better error reporting. Callback functions now
also return null as code when everything is OK. This is the standard
error handling way.
Merge pull request #1 from gpetrov/master

Fixed CWD bug and improved error handling