Python Replace String Using Sed With Variables