Make sure all collectd directories are created

Also use strings for mode def to be compat with Ruby 2.0