Removing leading slash for apps in subfolders

http://mydomain/myapp was loading http://mydomain/i18n/resources-locale_lang.js instead of http://mydomain/myapp/i18n/resources-locale_lang.js