kernel: make the ubi attach patch check for a valid ubi magic rather than a tar magic