Fix InstallDependencies on compile package message

Declare a variable `string packagesDir = Path.Combine(Config.BaseDir, "packages")` and reuse it.