Use Path.isValid

TBR=rafaelw
BUG=

Review URL: https://codereview.appspot.com/12810044