JSON: add fallback to original slug approach

If we can't get the cached plugin slug, let's try to infer that from the
path to the plugin file.