Python fixes

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