`$root_dirs_size` should be `size($root_dirs)`,
just use `($root_dirs_size > 2)` later

Also why `> 2` I'd say it needs a comment what  this is about?