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