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
Fixed mixed indent
Merge pull request #11 from jorgeegomez/master

Incorrect use of getattr on dict