Fixed renaming sprite breaking script references to that sprite

Fixes #101.
Fixes #14.