diff: rename read_directory() to get_directory_list()

Including "dir.h" in "diff-no-index.c", it causes a compile error, because
the same name function read_directory() is declared globally in "dir.h".

This change is to avoid conflicts as above.
diff: use is_dot_or_dotdot() instead of strcmp()

The is_dot_or_dotdot() is used to check if the string is either "." or "..".
fsck: use is_dot_or_dotdot() instead of strcmp()

The is_dot_or_dotdot() is used to check if the string is either "." or "..".