fix checking existing media files

Change-Id: I25c4bd32c65ad18447ca166dbad73ddab35c405c
Reviewed-on: http://review.couchbase.org/31137
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>