def wraith_image(file)
        data = File.read(file)
        image = Tempfile.new([File.basename(file), '.png']).tap do |f|
          f.rewind
          f.write(data)
          ObjectSpace.undefine_finalizer(f)
          f.close
        end
        image.path
      end
def wraith_image(file)
        data = File.read(file)
        image = Tempfile.new([File.basename(file), '.png']).tap do |f|
          f.rewind
          f.write(data)
          ObjectSpace.undefine_finalizer(f)
          f.close
        end
        image.path
      end
Make images temp files to save for later
 Once this script exits, the images will delete themselves.
   We need those images, so the finalizer is left undefined.
   http://stackoverflow.com/a/21286718
 @since 0.1.5
 @param file [String]
 @return [String] path to image