Some cleanup. Removing extra 'baseDir or ""' and an unnecessary RegExp.