Adds a workaround for mime type detection of empty files.

If you upload an empty file with no extension, php and the the apache process crashes on my system.
This bug was reported to PHP some years ago, but isn't fixed yet: https://bugs.php.net/bug.php?id=58023

My patch returns the same mime type the command `file --mime-type` would return, but only if the file has no extension and `self::getFileNameMimeType()` therefore returns `application/octet-stream`.