permalink to the latest do not respect -repository setting

'permalink to the latest' as well as the source url in `/latest/.htaccess` do not respect `-repository` setting and they point to urls like `/latest/git.hpi`. This does not work if the updatecenter is hosted in a subdirectory and not on a domain level.