CreatePairLinks function

Creates a pairs linking file.