Updates script to use 'nopt' module for option parsing.