Update index.js

prevents index.js from parsing autosave and/or backup files generated by texteditors. (eg. emacs appends "~" for backup files, wraps "#" around file names for autosave files)
Merge pull request #1 from sammychl/patch-1

Update index.js