Directory reader function added.

In both little and big endian files, directories can be read by this
algorithm.