Fixed for python 3 compatibility.

Getting exclude_keys not to use .keys().