fixes mktemp usage to be more colloquial; removes cruft; forces xcodebuild clean; removes temp directory