Add dart packages to .git, fix .gitignore.
Use more normal js syntax for cache checking.