Improve security handling provided filename values.