Ensure dir name safety by sleeping 2s at close.

To guarantee safety when the script is called several times, e.g.,
in a loop, make sure the dir names differ by at least 2s.