fix autotest failure with very large numbers of files (e.g. git repo with lots of objects). see https://bugs.ruby-lang.org/issues/4040