Fixes #94

Fixes #94
I would love to, but I'm not sure how you could refactor while keeping the same behavior. From what I've gathered, the original code seems to also accept keys like "subkey1.subkey2.subkey3.[...]", but I'm not yet sure what's the use-case for this. So, you need to iterate through one subkey at a time. If you don't find one of the subkeys, you break the loop and see if there are any default values. If you do find a subkey, you can't immediately return its value, since you need to continue the loop to go to the next subkey, if available.

If there's no use-case for keys like "subkey1.subkey2.subkey3.[...]", then we can remove the foreach altogether.