use absolute path for checking if a plugin directory is actually a directory.
Merge pull request #2 from liuhongchao/fix-plugin-name-problem

Fix plugin name problem