Filter kernel fixes

Sanity check for divisor, and preventing resulting colors from going out
of range
final version
Final version!

All done.