[previewjob] Check whether thumbRootDevice is valid before access
storageAccessFromPath may return an invalid device, e.g. because the thumbnail directory doesn't exist yet
In that case we must not use the device
BUG: 470845 (cherry picked from commit 3fdcb7bc)