Refactored the helper script.

It now accepts command line arguments.
Also adds some hackery to attempt to
build docs for projects which includes
module documentation, etc.