bin/rm-empty-dirs improvements