resolve the tempDir path (caused problems with relative paths)