Fixed renaming sprite breaking script references to that sprite

Fixes #101.