Adapt generate.py to slimmed-down log format

Adapts to shorter names and implements some slight optimizations.

For a quick test run, a task that created a 1.1GB log file before and an 800MB one now went from a pypy runtime of 43s to 36s. So about a 20% reduction.

This pull request also includes the argsparse changes, because I was too lazy to take them out and thought you might just as well merge them, too. :)