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

Fixes #1131.
I'm not sure why some paths start with `./` and others do not.