Replace File.exists? with File.exist?

To quell warnings on ruby 2.1
Merge pull request #13857 from teoljungberg/replace-file-exists-eh

Replace File.exists? with File.exist?
Add docs about behaviour of replacing a has_one associate object, that the previous one is deleted even if the new one
 doesn't get persisted to database.

 Fixes #13197 . [ci skip]
Merge pull request #13838 from vipulnsward/13197-fix-has-one-documentation

Add docs about behaviour of replacing a has_one associate object.
Fix indent on test case [ci skip]