Bugfix: replace os.link with shutil.copyfile.