Change dict.keys/values to lists

This fixes the script for py3k