MB-11106: handle paths with spaces

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