Cleaned up command line arguments handling in chsmack.

Argument handling code looks terrible at the moment in chsmack.
Migrated to getopt_long().