Added more test coverage, fixed bug relating to externally defined componet options

Added better handling of externally defined options. When installing a component locally, options defined in a separate file would not get copied, making the component throw an exception whenever the component was loaded. With this patch, both options defined in diversity.json and in external urls are supported.

Also, some more tests, mostly covering component options, registry modes and error handling.