JFile::makeSafe() allows spaces but com_media assumes it doesn't

A new PR for a previous closed one:

https://github.com/joomla/joomla-cms/pull/1590