Account for non-root deployments when generating shared query URLs

Fix #183.

Signed-off-by: Don Naegely <naegelyd@gmail.com>