directory services: cache the extension category directories

(integrated from trunk branch change fca86df by Todd Whiteman <toddw@activestate.com>)