Build working directory for the command script, specify it if it is different from the checkout directory.