Support for 1.8.7, Added Tempfile as an upload type, and some error fixes

Made some changes to support Ruby 1.8.7. I know it's older but some projects still need it, like mine. I also added Tempfile as an upload type so that an uploaded file from a form can be directly pushed to Crocodoc. I also ran into an issue with nil throwing an error in _error.