That's my picture :-)
I use a filament monitor with an encoder wheel that pauses the print if the filament stops moving (because a bulge got stuck, or filament ran out, or the hot end jammed, or whatever). I have a bunch of these on multiple printers: http://www.toybuilderlabs.com/products/tunell-3d-printer-filament-monitor
The Tunell monitor works with Sailfish, Marlin, and Smoothie to my knowledge. This particular one doesn't work with Repetier, but you can wire up a simple encoder wheel to use Repetier's filament monitor functionality.
Like other people have mentioned, you should avoid cheap filament, and return spools with bulges. I personally only see bulges like that maybe every 20 spools or less.