fix parse for multiple dots in local js file

The regular expression ```/^[\.\/~]\.?[^.]*\.(js|css)/``` was not picking up local js files like ```/somepackage.amd.js``` .

```/^[\.\/~].*[^.]*\.(js|css)$``` works for me.