Simple link validator and replacer script