updated build to work with Mavericks code signing fun; also cleaned up the applescript to work more reliably