Implements reading a file and replacing indicated portions (as defined by %Options{} and the strings "begin @doc " docname and
%Options{}
"begin @doc " docname
`"end @doc " docname` and
Saves all files according to options
Funcitions working on Pairs