Add support for specifying a working directory for objects.