Use correct baseUrl when using a reverse proxy consisting of subdirectories

Fixes #250.