Only try to cache dependencies when Amazon secret is available

Fixes the case when someone forks the repo and runs Travis on their own.
Also, allows the use-case of restoring dependencies only without
necessarily trying to cache them.