Parse arguments with optarg.
Apply setjmp and longjmp fix.
Fix a warning in main and fix argument parsing bug.
Merge branch 'feature/optarg' into devel