WIP: Peter fogg/course image upload

@cahrens This should be mostly finished on the dev side. @singingwolfboy, I've made a few small changes to the file upload dialog and moved some code around to support that. Could you take a quick look at e8f40bc to ensure that everything is still OK?