Use lib's cmdline loop.
Restrict defaultMain to Diagram SVG.
Fix Pentaflake example.