Update apply_config.py

Proposed fix for https://bugs.launchpad.net/os-apply-config/+bug/1321827 gracefully handle the traversal of strings in a key search path