Throw a real error when uploading non-file things in Ruby.

Signed-off-by: Jari Bakken <jari.bakken@gmail.com>