Switch to using yargs for options parsing as optimist has been deprecated.