stringByStandardizingPath not only gets rid of . and .. in the path but also remove an initial component of “/private” from the path if the result still indicates an existing file or directory (checked by consulting the file system).
The /private only shows up when running on device (not in simulator) but causes the if (![filePath hasPrefix:wwwDirPath]) check to always fail.
Merge pull request #816 from wmathurin/master

stringByStandardizingPath not only gets rid of . and .. in the path
Merge remote-tracking branch 'origin/master' into unstable_merge
Merge pull request #829 from khawkins/unstable_merge

Mobile SDK: Merging master to unstable