Replace some common text in files using python