Change from getopt to popt -- requires const-correctness on arguments.