Sinatra/JS script to take "screenshots" of a web page