add function to check if a file exists

note this affects VirtualDirTgz in landsat reader handle in a beam pull request