Fix JS resource paths
Handle different install locations resource path wise
Merge pull request #1 from wmde/fixjs

Automatically determine the correct remote script path