Updated build.ps1 to ensure that endgate files build correctly.