Fix syncto on close

Storage has been able to assume that sync() wouldn't be called while it
was closed up to now, but the sync plugin breaks that assumption and
shouldn't really have to check itself to make sure sync() won't blow up.