Python fixes

Several fixes related to PyObject to Mat conversion. Added some initial script with the tests (related to the fixed bug) for cv2 module.