Fixed problem with model validate function.

* mongoengine added a new parameter clean that was not present in one
  of the implementations of our models.
Fixed issue with API handling of files.

* Prevoiusly the non-file payload was not being parsed correctly.