extended replace.php with --reverse and --zpp