[Issue #26] Fix handling of CLI options