Handle empty registries list. Fixes #26

If the registries section is left empty, PyYAML returns None as the
actual value (instead of an empty dictionary, which is normal because
it can't guess it's supposed to be one), so the default value to
_config.get() wasn't used. This change makes sure that _registries will
be a dictionary even if it's empty. Also fix a few Python 3
compatibility issues (but there probably are still many more).

Signed-off-by: Maxime Petazzoni <max@signalfuse.com>