fix extension check, look for '.js' not just 'js'

fixes #11