Batch utility to composite Normal Maps With specular map as alpha channel

The Studio is looking to optimize textures by using the alpha channel of the normal map to hold the specular.
I’m pretty sure this is not new. What is a good scriptable batch utility for doing this?

http://felixschlitter.com/snippets/quick-save-maps

let’s you save out maps from named layer group’s in ps.

or you could write something useing the python pil library if you wanted to do so with out needing Photoshop.

ImageMagick – Mastering Digital Image Alchemy is also a good option

thanks guys