fix Issue 9829

- getting program and arguments before calling getopt
  on the shortended args avoids the need for the '--'
  getopt separator in the first place
Merge pull request #54 from dawgfoto/fix9829

fix Issue 9829