Fixed Nil error for nested fields

Fields with multiple dots (e.g. "@fields.data.timeTaken") caused a Nil error in field_type due to collect_item_attributes returning an empty array.
This happens because the field string only substituted the first dot.  Converting from "sub" to "gsub" resolved the issue.