Fix plugin generator for non-dir in lib