Ensure we pass a directory to mkdir_p
Ensure we pass a directory to mkdir_p

The cache path may be a file by the time we get to "push".

See https://github.com/travis-ci/travis-ci/issues/6004

It is permissible to leave the "add" stage as is, because when we add
"path" with `#mkdir_p`, we create a directory. If the cache contains a
regular file pointing to the same "path", the directory should be
overwritten by the regular file existing in the cache (because the
directory we created in the "add" stage should remain empty).

travis-ci/casher,travis-ci/casher