Better logic in 'build_opts_objects'

* add logic to build_opts_objects to allow for only short-name, only
  long-name, or both, building optstring and longopts appropriately.