Prevent argumen exception when _workingdir is not a directory.