added verbose option to validate.js; getopt support to validate.js