Allow passing a working directory as option

This commit allows to work from a different directory as the one you are actually working in (aka cwd).