Fixed logic errors in rangeToCIDR that caaused problems with 255.0.0.0/8