Refactored the code deciding where to add resources, and a cleanup of logging.
Merge branch 'master' of github.com:datagovuk/ckanext-dgu