nixos-rebuild: Handle .version-suffix not being writable

Reported by @vcunat.