Make executable.
More idiomatic Ruby.
Stop going through huge primes once factored. Reduces run time from 80 to 3 seconds.