Fix tests for exception catches on file stats.
Update .gitignore for use with tern.