Allow cwd to be configured for compile

This makes it possible to specify the cwd for compilation.  The Compiler resolves all paths in compile options relative to the current working directory.  By default, `process.cwd()` is used.  To override this, a `cwd` option can be provided.