Fixing the os stat test.

Relate to #2220