update: check for enough space before copying KERNEL and SYSTEM files

closes #1984