diff-no-index: replace manual "."/".." check with is_dot_or_dotdot()