check patch history through native api

solution for the tmp files cleanup

fix imports

test for spaces in filenames; re-use assertPatchElements from Alexey's test
new test CumulativePatchingScenariosTestCase

re-use assertPatchElements from Alexey's test in CumulativePatchingScenariosTestCase
log commands which are sent to CLI