Fix applescript execution issue (System Events reports error) with OS X 10.9 Mavericks