Implement first version of getOpt.
Clean up implementation.
Move option init.
Missed two lookups.
Merge pull request #59 from srijs/feature-getopt

Merge getOpt implementation.