fixed resultDir bug

If the source directory was given as . then the resultDir was wrong. This fixes this.