Don't use optparse, as it will remove the option args from ARGV, even the ones that it doesn't know about.