Merge pull request #1 from nlhepler/master

Merging Lance's edits
Fixed a boundary-case bug where the existence of argv[++i] wasn't being checked; e.g. if -something string was expected but only -something was supplied
Merge pull request #2 from veg/master

Fixing a possible argv buffer overrun if the argument string is misspecified