Added some internal sanity checks to dir_read().
Added some internal sanity checks to dir_read().

dryproject/libcpr,dryproject/libcpr,dryproject/libcpr,dryproject/libcpr,dryproject/libcpr,dryproject/libcpr