Added support for working directory to code-behind implementation