def download(url, path)
      if url.match(FILE_URL)
        FileUtils.cp(url.sub(FILE_URL, ''), path)
      else
        File.open(path, 'w+') do |file|
          Net::HTTP.get_response(URI(url)) do |response|
            response.read_body do |chunk|
              file.write chunk
            end
          end
        end
      end
      path
    end
def download(url, path)
      if url.match(FILE_URL)
        FileUtils.cp(url.sub(FILE_URL, ''), path)
      else
        File.open(path, 'w+') do |file|
          Net::HTTP.get_response(URI(url)) do |response|
            response.read_body do |chunk|
              file.write chunk
            end
          end
        end
      end
      path
    end
Download a file to the specified path.