Getopt clone