Added support for directory lookup.