fix issue with --repositorypath not honoring --prefix

split off from #1028 

@stdweird: please review
doesn't matter, since repository isn't initialised here (as opposed to with the legacy config); the actual initialisation is done later when `repository` is configured via generaloption