This is a tad late, but it answers the question.
Buy (or locate, if you already have some laying around) an iron-on patch that somewhat matches the fabric of your trousers. Cut the patch to cover the rip completely, plus a little. Turn the trousers inside out and apply the patch to the "wrong" side of the rip. This will hold the flap of material down, and if none of it has frayed it should look good as new.
Shay
October 2010