Ruby version of file_entropy.

Histogram generation line came directly from StackOverflow :)