Add support for directories.