Updated paperclip to_file method.