Updated the script, the changes are:
Enjoy.
- can now also load tiles in a new image (for most reasonable naming schemes, will even guess number of rows and columns)
- script no longer deals with layers, it now deals with the whole image (menu entries now in File>Open and File>Export)
- ability to specify width and height (as an alternative to columns and rows)
- some more format variables
Enjoy.