Add test-bin.py for ctypes bindings and fix few r_bin vapi issues