LUN-1258: fixed infinite loop when restoring file
* added tests for file restoring
* SettingsOverride can now be used as function/class decorator