add positional argument "inputfile" to argparse
convert input file to output file only if latter is outdated
avoid list comprehension shadowing previous p definition
comment unused vars detected by pyflakes