Replace hash characters in basename
Avoids a parse error.
This bugfix brought to you by stupid Flickr users who include hashtags
in their picture titles. #badidea #breakseverything #stupidfads
Uses $wgIllegalFileChars which doesn't *actually* include the hash character.
So we have to add it.
Also changes the behaviour to use hyphens for replacements, which is
consistent with Special:Upload (not to say that's a *good* idea, but
it's better than just removing the characters...)