getopt-like option parsing in Lua