After many rabbit holes, base64 decoding works

Had to use a temp gridfs file and then decode to the permanent one (then delete the temp files).
Getting this to work correct with all the async stuff going on was much more difficult that I had expected...
Fixed mocha tests for new urls.