cleanup: explicit dict keys conversion to list

In Python 3.3 dict keys() method returns a view,
not a list. Adding explicit conversion when needed.

Change-Id: Ie2cc9921cbaf67f2081039d0c5723bf07b53f87f
Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>