Use work_dir option to let the user pass the work_tree as arg

This may help in specific cases e.g. when we want to issue a diff
request like "git diff origin/master" for a repository in a different
folder than the PWD.
Fix spec to take into account the new work_dir option