Small perf improvements for Directory

 - https://issues.jboss.org/browse/ISPN-4710
 - https://issues.jboss.org/browse/ISPN-4805