Fix committing empty untracked folders.

TBR @devoncarew 

fixes #2167