update: check for enough space before copying KERNEL and SYSTEM files, closes #1984
Merge pull request #1995 from vpeter4/update

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