I took a look. I don't think we should do for following reasons:
a. The ". ($scriptFolder + '.\SetupEnv.ps1')" is used to run "SetupEnv", which is not directly related with the BuildTarget
b. In RunCheckinTests.ps1, the $scriptFolder will also be used to construct the webpi command, so i can't wrap them up.
c. Because #a & #b, it leaves me with only 2 files of "Build" and "BuildSetup" which potentially can leverage the common subroutines. I would choose to keep the existing logic because of the limited gain.