typemap: Correct croak message
Added support for patches
Added tests for patch functionality
Updated documentation for patches.