Cleanup path & ident regexp: make more readable

R=arv
BUG=

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