     name += alphabet[rand(alphabet.length)]
   return name
   
-mkdirp = (path, mode = 0755) ->
-  return 
+mkdirp = (path, mode = 0755) -> 
   parent = dirname(path)
   mkdirp(parent, mode) unless existsSync(parent)
-  fs.mkdirSync(path, mode) unless existsSync(path)
+  unless existsSync(path)
+    fs.mkdirSync(path, mode) 
+    g_createdDirs.push(path)
 
 cleanDir = (path) ->
   for f in fs.readdirSync(path)

          srcStat = fs.lstatSync(SRC_DIR)
          dstStat = fs.lstatSync(DST_DIR)
          assert.equal srcStat.size, dstStat.size
}).export(module)
ALPHABET = 'abcdefghijklmnopqrstuvwxyz0123456789'.split('')
SRC_DIR  = '/tmp/test-copy-files/src'
DST_DIR  = '/tmp/test-copy-files/dst'
NUM_OF_FILES = 20
FILE_SIZE_LIMIT = 1000

g_createdDirs = []

rand = (n) -> Math.floor(Math.random()*n)

