Extract bug numbers from E-R comments

Also, reworked to use argparse. Remembering which environment variable
to set is a big pain.