it dosen't look too rusty to me....
Hit it with a wire wheel, sand it and paint it. Also get a small hammer and make sure the spots where the bolts come through it are flat again. It'll be good to go.
Make sure the surfaces on the block are clean too.
As far as replacing it goes, I have had good luck using weather strip adhesive to glue the cork gasket to the cover before setting it back in place.
I can't remember how the PVC elbow went on (welded?), but JB weld will probably work.