Python Replace String Using Sed To Update