The Zephyr fs readdir abstraction returns OK with a zero-length file
name when the last directory entry has been found. The loop to build
multiple entries instead checked for a non-file entry type.
Correct the loop exit condition.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>