Tiny and simple support for directories in addition to filesgs