Test for files first before reading them.

It appears that sometimes trying to read a file that doesn't
exist causes issues with later reads to that same filesystem.

Change-Id: I62fae1c30cb774710ce7b6fcb87c522d7ce1bae5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/623679
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
30 files changed