Fix cleanup call when an error occurs
Fix issue with filenames that contain spaces
Fix issue where files in the patch with spaces in their names get mistaken for multiple files