update copy_collection.py for backward compatibility

changes to make hydra work in python2.6