Avoids the "Too many open files" error in case of a large number of input files.
Merge pull request #1841 from ykmm/atlas-toomanyfiles-fix

Avoids the "Too many open files" error in case of a large number of inpu...