Fix sleep command on OsX

Based on http://www.uponmyshoulder.com/blog/2010/put-os-x-to-sleep-via-command-line/