You need to add using System.IO; on top of build file as Path.Combine is System IO function.
using System.IO;