"make demo" passes (and reports failures better)

had to work-around the fact that /file POST returns json for failure and json wrapped in HTML for success (comment says it is for IE).  I simply made the tests work for the behavior that the code seems to intend.  Also, there seemed to be a typo in FileController.js for processing files.  All seems to work with these changes.