updated to work with contourp for posix/gnu style get-opts