append subdir to the js response

Fixes Issue #346

When running a Rails app under a subdir, after uploading, when on the tab "Image Info" tab, the url field has a wrong url, missing the subdir.