create and use general function arg_issourcedoc
create and use general function arg_issourcedoc

a source document is defined as either a file with a known ending (e.g. .xml,
.sgml) or a directory name containing a file with the directory name plus a
known extension

create a small function (arg_issourcedoc), which takes a filename and returns
that filename if it is (possibly) a source document or, if it is a directory,
finds the main file in the directory which represents the main document

tLDP/python-tldp,tLDP/python-tldp,tLDP/python-tldp