first correct grader.js ignoring coding style and other reusability and extension
code refactored: correct and polished version of grader.js which fully meets the requirement: Update grader.js to take either a file or a URL as an input on the command line.