I think `dir.empty?` would be more idiomatic, but I'm not an uberrubbyist.