Consistency in handling HTML and LaTeX in respect to header and footer

There was a discrepancy in the handling of the header and footer files between HTML and LaTeX.
Also the wrong error / warning routine was called and the config_err and config_warn have been made more consistent with the messages(.cpp)