Avoid map flatten with Dir.