Move argv parsing into __main__