Tracked down issue with deps_test()

--closedir() must have been trying to close files that have already
been freed...