MDL-70130 core: Compare realpaths for file attachment checks