Support for changing CWD + respecting source path

This adds support for changing the current working directory via
options, and uses the source path (relative to the cwd) instead of just
the filename when determining the destination path.