Add cli.py with utilities for writing command line scripts
Refactor and improve splitlogs using argparse