zdir now resistant to all file types

A directory full of UNIX sockets caused a zlist full of NULL. When the comparison
hook was called, no check was performed on the pointer's validity. Now it
doesn't segfault (for this reason).