Finally figured out what was wrong with the script in SLADE versions 3.2 and onwards. Now the download contains both a version for SLADE 3.1.X and SLADE 3.2.X. The latter will error upon completing the sprite renaming, but otherwise works entirely as intended. The 3.2.X version can even be used as an Entry script if so desired.