Use cb_mktemp instead of mktemp

Using mktemp emits compiler warning on some systems.

Change-Id: I8f409b8863fbedd44f34489214f991372d0673b2
Reviewed-on: http://review.couchbase.org/42786
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>