Handle pkg path properly for generating local repo when PKGDEST is set