Remove requirement for python 2.7 by using optparse

Uses optparse instead of argparse such that it is compatible
with pyton 2.6.x.