This had me stumped for a while earlier, I had created a Web Part project and wanted to include an image to be deployed to the TEMPLATEIMAGES directory of the 12 hive.
Originally I added a module to the project but this would then copy the image to a folder in the actual site itself which I didn’t want.
The solution is to use a ‘Template’ -
Right click on the project in Visual Studio and select Add > New Item
Select a ‘Template’ and give it a name, this will add a folder in your solution called ‘Templates’ with a text file inside that has the name you gave above.
You can then add the 12 hive TEMPLATES folder structure under here and any files will be copied to the 12 hive when the wsp solution package is installed.
Hope this helps!