Update index.js

Fix bug when there are spaces in file paths.
Merge pull request #3 from romeovs/master

Fix bug when there are spaces in file paths.