Update cache file if parserTests parser or .txt is updated (take 2).

This is a better solution than the fix already merged in
e348d00e3314d5b0ee6b7ce3d813f84baea6d594 -- it uses the existing
fileDependencies[] and CACHE mechanism of ParserTests.getTests().

Also fixes a bug where the cache file was written to the cwd, not the
__dirname directory (ie js/tests), and adds the cache file and the
parser tests to .gitignore.

Change-Id: I051349612e9a23a9aaf8a534161c80dfcae8db96
Merge "Update cache file if parserTests parser or .txt is updated (take 2)."