Tried the code on both my macs, running OS X 10.9.5. One of them is a Retina MacBook Pro. No errors at all.
For both these systems, I essentially threw out all the old Mathematica cruft -- I had stuff in the base directories from version 6. I did this during the beta tests to get rid of problems that while not exactly the same of this, were in the same general area -- basically just weirdness that could not be accounted for anywhere else.
My suggestion would be to make a copy of your base directories, do a clean install or just restart Mathematica, which will rebuild the defaults, and then add back in the files and folders you need from the backup.
The mechanism that Mathematica uses to store add-ons, options, etc., makes it easy to accumulate stuff. I did not investigate the problems I had, other than making them go away. Since I did that, there is only the 'normal' weirdness. ;-)
george