Bug 525705 - skip thumbnailing entirely on files with insufficient...

...read permissions

Apply modified patch from Sven Neumann which implements just that.