Do not process already visited objects

Remember the objects those we have already processed so the image path will not get appended more than once.