livebuild: More refactorings for proper local repo creation