Trim trailing slash on dirPath