ensured redirect takes into account path prefix

this is pretty crude (cf. inline comments) and makes testing awkward

it'd be much more elegant to use reverse routing:

    router.HandleFunc("/preferences/{user}", PreferencesHandler).
        Name("preferences")

    // ...

    url, err := r.Get("preferences").URL("user", user)

however, we don't have access to the router instance within handlers (or
do we?)