I have put my code up at github. Very simple usage: "python stlmerge.py file1.stl .... filen.stl output.amf.xml"
The stl file names must exist. The amf.xml file name will be overwritten/created. I do not enforce the file naming conventions, but slic3r does, so be sure to use .amf.xml as your suffix.
Also, I do NOT do anything with the STL data. I do not drop/raise so that the minimum Z is 0 and I do not center the object(s). Whatever coordinates are in the stl files are taken as is and written to the aml.xml file. The code could be easily modified to support these features, and I was thinking of enhancing it a bit, but I'm about to leave on a business trip and I wanted to get this out there.