Add Rails 4, rubyzip 1.0 compatibility

Updated to work with rubyzip >= 1.0.

**Warning** I have only tested this on Rails 4. Not sure if Rails 3 works with this version of rubyzip.