Properly run on Mac OS X when starting from Finder