installmaker.cs line 162 crashes if any of the files in the temp directory are read only. I added the following before the delete directory and it then worked.
// Process the list of files found in the directory.
string fileEntries = Directory.GetFiles(Installer.tempPath);
foreach (string fileName in fileEntries)
// set file attributes to normal so can delete read only files