'Return the filename for the document name.
If base is True, return absolute path under self.srcdir.
If base is None, return relative path to self.srcdir.
If base is a path string, return absolute path under that.
If suffix is not None, add it instead of config.source_suffix.'

def doc2path(self, docname, base=True, suffix=None):

    suffix = (suffix or self.config.source_suffix)
    if (base is True):
        return (path.join(self.srcdir, docname.replace(SEP, path.sep)) + suffix)
    elif (base is None):
        return (docname.replace(SEP, path.sep) + suffix)
    else:
        return (path.join(base, docname.replace(SEP, path.sep)) + suffix)
