Use NSWorkspace's method for revealing in finder

It is more reliable than applescript and works for Path Finder users as well
Fix compile error.