MB-10793: use mkdir -p to check directory instead

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