Fix treatment of script file

Blank lines, comments, etc are allowed.
Rmd files are accepted (fixing #1)