added more checks for headless grader
changed file permissions for grader.js