Those rails just pop up. They're held in by like 5 or 6 clips I think. Start from the back (like in the OP's picture) and use a small flathead screwdriver. You can use the seal on the rear windshield as leverage. You'll probably break the first clip or 2 but after you get the second clip up you can slide the rail back...it'll just come off.
The seals are glued in but they're easy to take off and replace too. I didn't even reglue mine. They just slid back in.
You could also vinyl the trim. I didn't have that peeling but I vinyled mine matte black. Just make sure you sand the paint flat otherwise the chipping will show through.