Update cache file if parserTests parser or .txt is updated.

Also allows using runtests.sh from directories other than js/tests.

Change-Id: I5b9208dc14ed6f68c7667530d30af254339c6435
Merge "Update cache file if parserTests parser or .txt is updated."