Use access instead of stat in PathExists and PathIsWritable.
Use access instead of stat in PathExists and PathIsWritable.

This change fixes the issue where PathIsWritable returns the wrong
answer when called by the superuser. It also slightly simplifies the
code.

This fix is helpful for Chrome OS because Chrome OS uses
PathIsWritable in backlight-tool

TEST=Verified that this change fixes backlight-tool (part of the Chrome OS power manager).
BUG=none

Patch by davidjames

http://codereview.chromium.org/2073005

git-svn-id: http://src.chromium.org/svn/trunk/src@47418 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: 01eeecd4fe32467a0360189be851dade34eeb1e5
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser