Fixed path bug on windows which was causing a StringIndexOutOfBoundsException

Fixed bug on windows which was causing a StringIndexOutOfBoundsException when running run-unit target