android: fix path check in stat and lstat