MB-11106: handle paths with spaces

Change-Id: I80d511e62cac1a7a19d288f78b489b0de1f19dd8
Reviewed-on: http://review.couchbase.org/37630
Tested-by: Chris Hillery <ceej@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>