Setitem array slice

Fix for bug #587  
Incorporated Antoine's suggestions 
Also includes a printf fix in cgutils.py and a compiler warning fix in _numpyadapt.c