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. This should ease the issue of showing plugins twice, where uncached plugins have the plugin file path instead of the slug.

cc' @lezama