Could you please use the PluginInfo object instead of this and the next funcs.
It should be along the lines of
  PluginInfo = require('../PluginInfo');
  pluginInfo = PluginInfo.PluginInfo('/path/to/plugin/');
  var name = pluginInfo.name;