Check that our Composer cache directory exists and create if not.

Fixes #2032