Fix race condition when writing into the cache (issued in #933)

This fix avoids the random `ENOEMPTY` errors occured when parallel
downloads of the same source finished and tries to write to the same
cache target directory.

This patch does not change the internal source cache handling.
The only purpose of this patch is avoiding an error „directory already
exist“ in a promise flow in which this was already ensured.

----

Okay. So far my proposal. It does not fix the real problem (parallel downloads), but we could have a solution for #933.

Additionally, I have no clue how to provide a test case for that racing condition. I've tried it locally with the Network Link Conditioner of OS X.. but that one takes several tries.