Bug 801909: Add validation to externalfiles.

* Move to a real management command.
* Add tests for updating and validation.
* Add ability to specify file class in settings.