PIM-1634: Add check write rights on directories