fix undefined "argv" when using in programatic context

Programmatic usage of `jsdox` is pretty broken; try to run it via Gulp as in the documentation example.

Anyway, this will put a band-aid on the problem, so `grunt-jsdox` will at least function.

`generateForDir()` is too tightly coupled to the CLI and should be refactored.