fix writing attachments as an attribute on a submission

refs CNVS-15830

test plan:
 * submit some homework with multiple files
 * they should all be there

Change-Id: Iba881874552b9d93255467bbecc6f4607d2d95c2
Reviewed-on: https://gerrit.instructure.com/41973
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>