Replace deprecated has_key method

This patch replaces the deprecated 'has_key' method for dictionaries
and uses the 'in' keyword instead.
Merge pull request #3 from vmrob/deprecated

Replace deprecated has_key method