It verfies that closedir deallocates memory and closes file descriptors. Reviewed-by: DJ Delorie <dj@redhat.com>