Updated regex to match .js files.

Use regexp.test in the _.filter function;
Removed \. in the client side to append the 'dot' on the server side.