Fix: allow extensionless js files to be read using the cli (fixes #1131)

Fixes #1131.
It seems like this should be a separate test case.