Add directory wrapper and tests