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

Fixes #1131.