MB-11106: handle paths with spaces

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