Use File.extname instead of String.match on file name