getopts: cleanup generation of command line