If you find your Mac won't go to sleep, check out the results of this command:
pmset -g assertions
I found that Internet Sharing was preventing sleep:
$ pmset -g assertions
03/08/2013 21:19:08 BST
Assertion status system-wide:
PreventUserIdleDisplaySleep 0
PreventSystemSleep 1
PreventUserIdleSystemSleep 0
ExternalMedia 0
UserIsActive 0
ApplePushServiceTask 0
BackgroundTask 0
Listed by owning process:
pid 47(InternetSharing): [0x000000080000012c] 04:18:36 DenySystemSleep named: "com.apple.InternetSharing"
So I turned off Internet Sharing...
osx:wontgotosleep is mentioned on: OSX