URL Shortener in Ruby Sinatra