Fix addon loading issue

Check if dependency exists before loading it when loading the dependencies for an addon and raise an exception if it doesn't. This fixes #270.