Fix off-by-one error when adding frames to Animations

Also, close a FileParser that was left open in AnimationSet parsing.