a little refactoring for CarrierWave::Test::MockFile