Use osxiconutils instead of rickety script.
Use the temp folder for all intermediate files.

This makes for easier debugging and cleanup.