Miguel/plugin refactor

I'm surprised you need the `!!` here. Also, it might be more readable to just use `plugin.directories.length > 0`.