Fixed issue when rootDir contains spaces.