Add python version of the thumbnail regeneration script.