Automatically generating the getopt optstrinrg