Fix extraction of existing dynamic styles from FS when style name is used as the file name

If we have a dynamic style, dynamic_42x42, and the style name
is used as the file name, the file name may be dynamic_42x42.jpg,
so when looking at the FS and pulling out our existing dynamic styles,
we want the style name (the key in the styles hash) to be "dynamic_42x42",
not "dynamic_42x42.jpg".