Fix crash if plugin directory does not exists.