Bug 871647 - Add file extension support for filename generation in utils