Fix handling of newly-added default enrol instance

add_default_instance returns the ID, not an object - so we need to feed its return into $instance->id rather than feeding it directly into $instance.
Merge pull request #8 from pauln/master

Fix for adding new (default) enrol instance
format: validate formats supplied in the upload file
improve error message on missing category
cli: incorrect default cource category - thanks Jim