Fixing build and test process on Windows

Closes #2006
Given the similarity of these commends, perhaps better to store the args in a variable so there's only one place to update?