reproduce Bug #3112
when listdir returns no files, clone

Fixes #3112.
Merge djmitche/buildbot:bug3112 (PR #1447)