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

Also, close a FileParser that was left open in AnimationSet parsing.
Merge pull request #1270 from dorkster/fixes

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