config: extract prepend_installroot() to a public method.