replaces optparse with the newer argparse
Merge pull request #345 from haarts/issues/convert-opt-parse-to-arg-parse

replaces optparse with the newer argparse