fixed #1464 - change so persistence dir is only backed up if node is HA ...

...master or HA disabled; handles the case of HA autodetect selecting master hence the complexity.

also fixes some leaks in test and improves atomic file update support in FileBasedObjectStore.
(incorporates new logging from #1469)
i was in a weird state where some of the `@BeforeMethod` and `@AfterMethod` methods were running even though the test was not, so some errors were being swallowed, that's why for the extra logging