Checking support to load themes as extensions

This works by checking if the “theme” field exists in the package.json
to determine if the extension ought to be treated as a theme or not.