Add a fake filename extension when needed.