Fix issue with Path.isValid

Previously the following was considered a valid path, "a b c", because
we just stripped all whitespace, leading us tp treat it as "abc".

R=rafaelw@chromium.org
BUG=

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