After Joseph's suggestion I bought the Applescript and pointed it towards Photoshop CS6. It worked fine the first time but not after that. I figured out that as long as the “Exported Master Images” folder on my desktop is there, the script fails. If I delete this folder and run it again, it works fine.
Any ideas? Ideally I'd love to be able to add something to the script to delete the folder (or at least the contents) but my Applescript skills are not any good :-)
Edit: The exact error message in the Applescript Editor log is 'error “Finder got an error: The operation can’t be completed because there is already an item with that name.” number -48'