Log Message:
-----------
utils: address the deprecated `readdir_r` function usage
Replace `readdir_r` usage with `readdir` as multiple sources claim that
`readdir` must be threadsafe. In Linux (at least), this function has
been marked deprecated because of this reasoning. FreeBSD and NetBSD
have both had threadsafe implementations of `readdir` over the past
decade.
This fixes `-Wdeprecated-declarations` issues with gcc, etc, on Linux.