Fixing bug when verifyin cached content.

When accessing directly an URL with a dir inside a cached directory (like `/media/cache/offer/media/` for `/media/cache/offer/media/thumb-image.jpg`) the response returns with a 500 code. After changing the using of `file_exists` by `is_file` function, to check if the path realy contains a file, the response return with a 404 code, that is "more" correct.