Replace deprecated optimist library with yargs and update tabs to spaces