'Handle creating a custom docs_dir if it doesn\'t exist.'

def docs_dir(self, docs_dir=None, **__):

    checkout_path = self.project.checkout_path(self.version.slug)
    if (not docs_dir):
        for doc_dir_name in ['docs', 'doc', 'Doc', 'book']:
            possible_path = os.path.join(checkout_path, doc_dir_name)
            if os.path.exists(possible_path):
                docs_dir = possible_path
                break
    if (not docs_dir):
        docs_dir = checkout_path
    return docs_dir
