#51781IMAGE content object accepts directories
Description
When the path of an image content element is the path to a dirctory and not to a real file it should not be rendered.
I think I found the problem in commit:6aad338a in \TYPO3\CMS\Core\TypoScript\TemplateService->getFileName().
parse_url() accepts the path to a directory (e.g. uploads/myextension/) so it will return the path unchanged, even if the file does not exist or is a directory. In the old version of the function it only returned a value if the provided file was a real file.