BUG-981: remove use of deprecated getPath()

Here we're only iterating through, so there's no need to get the
Collection.

Change-Id: I32f9005dafc8df8ae059bb5da2c6d57132749219
Signed-off-by: Robert Varga <rovarga@cisco.com>