MB-10793: check existence of directories

Change-Id: I3cf5fb3c676e6be719fec4c79952c688f62f8478
Reviewed-on: http://review.couchbase.org/35640
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Reviewed-by: Eric Limare <eric.limare@couchbase.com>
Tested-by: Eric Limare <eric.limare@couchbase.com>