Check for the existence of the file before opening it

I had to add the following test to avoid ep-engine to
dump core on SmartOS.

Change-Id: I139acd69de51547e71ea0f787e4c6f903f5e4ba4
Reviewed-on: http://review.couchbase.org/27922
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>