Make the doc checker more generic.

Now I can use it for dgd kfun pages as well.
Still needs improvement.