fix Ruby 1.8.7 compatibility

8e58b6663a0 has some bugs.

* Dividing by 100 and 1000. These should by 100.0 and 1000.0.
* Ruby 1.8.7 hash is not orderd.
delete temp file
Merge pull request #9 from marutosi/fix-ruby-187

fix Ruby 1.8.7 compatibility
Merge pull request #10 from marutosi/del-temp-2

[resend] delete temp file