Thumbnails in a different folder

Is there anyway to make the thumbnails appear in a different folder other that the folder that the images originated from.

I.E.

SOURCE FOLDER: /gallery/01/pics/
THUMB FOLDER: /gallery/01/thumbs/

Ive looked over the script and spotted the bits that check for the files and so forth but i want the thumbnails to be elsewhere and not just mashed into all the other images!

thumb location

The thumbnails are saved in a subdirectory called 'thumbnails'. Unless the script is unable to create this subdirectory or it does not have write access to this directory it will try to save the thumbnails in the root.