Use argparse namespace, fix input directory parsing
for pytest, to expand bash input variables. Assorted
pep8 related formatting fixes