Speed up thumbnail purging a bit for stash script

Change-Id: Ie0f3d5aa505a5c1554d7932d38ba376811590df1