If you want a module name you should ask for a module name, not a module path, i.e.
String moduleName = informer.getModuleName(unit);
not:
String moduleName = informer.getModulePath(unit);
My JBAS-7644 work included a hack to make getModulePath() return the name, assuming it would be replaced by JBAS-7798 work. If that's not going to happen the method should be renamed.