Moved getopt functionality to argparse.lua.

I also made a few minor code corrections.
Renamed lkplug to lkplug.lua to clarify file type.