Replace key existence tests with dict.get()

Replaced instances of this pattern:

if 'key' in somedict:
    var = somedict['key']
else:
    var = ""

...with this much simpler pattern:

var = somedict.get('key', "")

Some variations, like returning None if the key is not found were also
replaced.