Hi,
Running:
sudo pmset -a standby 0
from the terminal seems to have fixed the "Drive improperly ejected" message on my iMac.
According to the pmset manual, Safe Sleep (where the OS writes memory to disk and powers down) is only supposed to be used when "hibermode" is 3 or 25. On the iMac, it default to 0, which is supposed to be disabled:
"SAFE SLEEP ARGUMENTS
hibernatemode takes a bitfield argument defining SafeSleep behavior. Passing 0 disables SafeSleep alto-
gether, forcing the computer into a regular sleep."
However, it seems that 10.8.5 has changed the behaviour and OS X is entering Safe Sleep.
Later, the manual reads:
"standby causes kernel power management to automatically hibernate a machine after it has slept for a specified time period. This saves power while asleep. This setting defaults to ON for supported hard- ware. The setting standby will be visible in pmset -g if the feature is supported on this machine.
standby only works if hibernation is turned on to hibernatemode 3 or 25."
So, setting standby to 0 seems to actually disable Safe Sleep and prevent drives from getting ejected forcebly.