Replace file references in the target files