utils/findKey perf refactor

removed the path var declaration from the loops

used `_.find` instead of `_.each` to stop the loop if `theKey` is found
Merge pull request #168 from paulfalgout/refactor/utils-findKey

[agent] utils/findKey perf refactor