Yes, that's what my code does too, i inverted the output, to make it easier too compare to your output.
Actually, gradients are vectors whos direction indicates the direction of the highest rate of change, and whose magnitude indicates the strength of the changes.
If you set pixel values to the magnitude, you get i picture like mine, but with edge in white.
Your technique detects edges because gaussian blur average colors around one pixel, so if you have a uniform area, the average tends to keep a close value to the original, but if you have an edge, the color is much more affected by different colors surronding it, so when you compute the difference, you can see edges.
Sounds like an esoteric technique, but works
I think what you want is a canny edge detector.
It's like a 20y.o. cutting edge edge detector.
First, you apply a gaussian blur to take out high frequency noise. Second then you apply a simple edge detection algo like sobel, or something else. Then you apply one more pass that takes out non maximum edges. Then there's a step called thresholding with hysteris (i didn't try to find out this step, but it can't be so hard, that gets you your binary picture).
http://en.wikipedia.org/wiki/Canny_edge_detector