Changed build scripts to make path manipulation less ambiguous