Add support for file upload

Note: This is an early merge (not complete, not tested) of the covariate file upload story, so that the file upload parts of it can be reused in the csv upload story.
I might add a convenience constructor with signature (boolean success, String message). No need to do it now though.