bin/rmempty: delete empty directories, minor fixes