Add failing test for directories ending in .js
Fix test by moving directory check over extension check
Add comment about path.extname and trailing '/'
Merge pull request #15 from AdamFerguson/dirs-with-js-ext

Directories ending in `.js` break