Add build.json to karma config

Karma serves the testrunner as /context.html, so we adjust XHR paths when we detect running under karma