Update check.js

added checkASTOutput.json code  to write the AST to a file
Merge pull request #1 from mattlowe/patch-1

Update check.js