munkicommon: remove tmpdir at exit

Currently importing munkicommon has the side-effect of creating a temporary directory in /tmp and this temporary directory is never cleaned up. To fix this with as small a change as possible, register an atexit function to clean-up this directory when the importing script exits.

This won't clean-up the directory in the event that the importing script exits with sys._exit or an un-handled exception. The cleanup function could be changed to remove any directory matching /tmp/munki-* if that were desirable.
Merge pull request #393 from russellhancox/patch-1

munkicommon: remove tmpdir at exit
Added optional user_agreement key. Displays text that end users can agree or not before continuing with install
Revert "munkicommon: remove tmpdir at exit"
Merge pull request #396 from munki/revert-393-patch-1

Revert "munkicommon: remove tmpdir at exit"
added more options for changing text, title and button text.

work in progress
Better support for alert with dict for specifying alert values.
changed pkginfo item from 'alert' to 'preinstall_alert'
moved preinstall alert code to it's own function (takes preinstall_alert dict as argument)
compliant use of NSLocalizedString so genstrings can do its thing
changes to allow MSC compile in xcode 6
Revert "changes to allow MSC compile in xcode 6"

This reverts commit 13cd0d2caf5dc44054235aaca78f03a2b6e66ca9.
added pre uninstall capability as well
Reverted to preinstall_alert and preuninstall_alert to keep in the scheme of other pkginfo keys
Move 'Embed version info' phase to end in Xcode project

- fixes issue where, in Xcode 6, the template app plists were not yet
  copied to the TARGET_BUILD_DIR during build
Merge pull request #398 from munki/xcode6-move-versioning-phase

Xcode6 compatibility: move Embed version info phase
Merge pull request #395 from bartreardon/user_agreement

Add optional preinstall_alert key to pkginfo plist.
Merge branch 'master' of https://github.com/bartreardon/munki