Add support for scanning directories