Added ability to require non-js file types

Webpack provides functionality to require multiple file types. This fix prevents an error being thrown and strips the js file extension. 

This issue was the only problem I had when running Karma and Webpack and seemed a simple enough solution. I am unsure if it's a viable work around to be merged into your master branch but thought it was small enough for a worthwhile punt :)