Fixed the CarrierWaveExtension so that it also works with RMagick.

In `Piet::CarrierWaveExtension.optimize`, replaced the call to `img.path` with `current_path` because they have the same functionality and are safe to use (see comments on http://www.rdoc.info/github/jnicklas/carrierwave/master/CarrierWave/RMagick:manipulate! and http://rubydoc.org/github/carrierwaveuploader/carrierwave/CarrierWave/MiniMagick:manipulate!).

I also added tests for this particular functionality. For this I had to add dependencies to the `carrierwave`, `mini_magick` and `rmagick` gems. Also, to run the tests, `imagemagick` and `jpegoptim` are required to be in the PATH.