The directory stream was not closed if dir.open succeeded in opening
the directory, but failing to read the first entry (which may be as
simple as an empty directory).
The directory stream was also not closed when dir.foldl2_process_dir2
returns an error value.
library/dir.m:
As above.
tests/hard_coded/Mmakefile:
tests/hard_coded/dir_fold.exp:
tests/hard_coded/dir_fold.m:
Add regression test.
NEWS:
Announce change.