Fixed crash because of out of bound index and fixed .gitignore

There is a crash sometimes if we change the _imagesArray thought the animateWith<...> methods while animating. This pull request fixes the issue.
This also fixes the .gitignore which should be ignoring much more files that it did.