I wrote this script a while ago. It was meant for getting 'color-by-layer' colors , but with the right settings it also exports the colors' textures; if you have it pre-set appropriately...
There might be something in there you can use ? It's a hack but it works...
If you see my post earlier of today about 'layer colors' you can seen in the associated script how you might use this method to get the model's materials...

