Clean up install scripts and files after installation completes. 

Title says it all.  Also shoved in a tiny fix for #1047.