add: minimal test for main(), use argparse instead of optparse