Refactor main script to use argparse instead of optparse, moved into main function

Trying to get smash to where it can be used more programmatically - analyzing some aligner/variant caller over and over again and aggregating the data. The first step of this was to put the "main script" into a function, rather than the base of the file. I also switched command line arg parsing over to the more modern argparse package as opposed to optparse. Also, modernized a few things, such as moving to using with semantics for opening files.