guard call to file-or-directory-permissions

related to PR 13359
also, Rackety
re-enable autosave only if a save is successful, not just attempted

when combined with 94b54db11823b4683234424174aca2836d422204,
closes PR 13359