correctly building paths to be fed into the batch file