Fixed resource loading

The script file loading did not work when using the plugin in a build.