context.set_directory: do nothing if object has no SetDirectory