Proper command-line parsing using getopts.