sst_fname.lower() should be moved out of the loop.
Nervous about performance implications of this loop as it is, @sjmachin ?