CP-49: Correctly require JavaScript for JavaScript projects.

GitHub: fixes #98
Merge branch 'bugfix/new-non-native-files'
Merge pull request #8 from pebble/master

pulling upstream