add check for making sure 'fd' belongs to directory in posix-readdir
add check for making sure 'fd' belongs to directory in posix-readdir

The root cause of this error is not found yet. But this check will
make sure that there is no crash when the situation happens.
Segfault can happen when a readdir() call comes over file's fd.

Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 192 (sefault in posix-readdir)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=192

Kaushikbv/Gluster,Kaushikbv/Gluster,Kaushikbv/Gluster