Use stat to determine whether the file exists or not. (issue #10038 reported by Mike...