Build CouchDB documents from directory, JSON or module