extradoc.py: Add output file splitting and conditionals.