Fix flags parsing (options without a value)

Also fix some typos and white-space issues. Reported at
https://github.com/pommi/CGP/issues/88