basecurve tool: switch to getopt for options