Fixes a bug where an invalid token would produce a JSON.parse() error.
Ignores node_modules