Fix running tests in out of source builds

Change-Id: I28ab507c6f1c5856f6d3f8ca335166cc785314b6
Reviewed-on: http://review.couchbase.org/35362
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>