add support for optional opts second parameter; use the opts.exts to determine whether to apply a transform to the current file