Add support for folders as input (with mkdirp)