Use optparse instead of manually parsing sys.argv