Incorrect use of getattr on dict

The correct way of getting a value from a dict with fail-over to a default, is by using .get (getattr works for getting attributes from objects).
Solves #10