I took the easy way out and did it in perl, myself. It's adaptable to different systems, because it takes XdYkZ[+-]M as an argument on the command line. d20 works, as does 4d6k3+2 (four six-sided dice, keep the highest three, and add 2).
Now that I think about it, I should add an option -L or...