fix javascript extension search

the test to check the extension of js file is not exclusive enough,
it included my emacs backup file ex: user.js~
which lead to this error:
OverwriteModelError: Cannot overwrite `User` model once compiled.