Problem: API generation no longer done here (it's in ztools)

Solution: remove this from mkdoc script
Problem: selftest code uses 'tmp' as variable name

And has other style issues. Solution: fix these.
Regenerated man pages:
Merge pull request #853 from hintjens/master

Minor maintenance