CopyOnWriteFs Stat function only checks its base file system's file or
directory when its layer file system returns Stat error but if the layer
file system type is OsFs, it returns *os.PathError not syscall.ENOENT so
in this case, the base file system's file or directory is never checked.
This fixes the behavior above by expanding *os.PathError and repacking
the error code if the error type is *os.PathError.