Fix fixURLs to employ the same logic as in the Wiki

When including an image in a wiki page, the server will look for it in
the static dir first, in the default static dir second and lastly in
the repository dir on a browser request.

When exporting pages e.g. to PDF though, the image's URL was always
mapped into the static dir, making it impossible to export pages with
images stored in the repository itself.