Add filename sanitiser.

This is very simple, and probably should move from blacklisting to
whitelisting of characters. But it has worked for the simple cases I needed
it for.