Fixed adding empty directories recursively

Last time I thought I fixed it but it was only adding top level empty directories. In this fix I moved adding empty directories to recursive addDir method so it's able to also add empty subdirectories