Fix argparse bugs

and also all tests

(this superseeds #173)