improving PluginDirectory (+tests)