Copy from http://code.google.com/p/statz/AppleScript/
Migrate to ARC