Add integration tests for 'modules.file.replace()'.
Fix backup and pre-/append behaviour in modules.file.replace():