Checking file extension in main

At the moment the first file in the `bower.json.main` list will be processed, regardless of file extension

I've added a filter by /\.js$/ to make sure the file that gets processed is js (and not css, mustache etc.)

As a suggestion, have you considered checking the alias list in `package.json.browser` for the correct file name to fetch too?