Replace optparse by argparse.

optparse is deprecated since Python 2.7:
https://docs.python.org/2/library/optparse.html
Merge pull request #132 from ctn-waterloo/argparse

Replace optparse by argparse.