Handle empty dirs.
Gitignore.
Added tests.