Use stat instead of relying on readdir to get dt_mode (g_preproc_dm) (8)

Signed-off-by: nixnodes <code@nixnodes.net>