Added support for generating docs from a directory.