Extended getopt module with dynamic options facility