function filterOnExtension (torrent, extensions) {
  return torrent.files.filter(file => {
    const extname = path.extname(file.name).toLowerCase()
    return extensions.indexOf(extname) !== -1
  })
}
Filter file on a list extension, can be used to find al image files
@param torrent Torrent to filter files from
@param extensions File extensions to filter on
@returns {Array} Array of torrent file objects matching one of the given extensions