fix 'undefined' folders in wiki sidebar upload tool

test plan:
 - have a course with multiple levels of folders in the
   file hierarchy
 - click "upload a new file" in the wiki sidebar
 - the "Folder" select box should
   (a) contain all the folders in the course, and
   (b) should show names for each (no "undefined")

fixes CNVS-13889

Change-Id: I0017ce3238046225545bba7d76d9b880d95eb093
Reviewed-on: https://gerrit.instructure.com/45515
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>