Fix for external generators extend Erb::Generators

HAML and probably other generators extend this class and invoke
filename_with_extensions with the old signature (without format).
This makes the second argument optional and defaults it to the #format
method which could be overridden as well.

Closes #14132.
Always return an array from formats so there is no need to wrap it when calling