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
Add bounds check when syncing Animations
Add error message to Avatar for when animation sync fails
Merge pull request #1271 from dorkster/fixes

Add bounds check when syncing Animations