Fixing resource lookup under Wildfly

Old code always returns null when using WAR inside EAR. From spec: `Returns a directory-like listing of all the paths to resources within the web application whose longest sub-path matches the supplied path argument.`

That means return files under directory, not the files.
I think that will not work in an war with `/META-INF/beans.xml` on servlet containers.
can you test it? (note: please wait for code review)