Removed unused imports
Check_space now works on multiple input files

Modified check_space() to check disk space based on an estimate from sum
of file sizes from multiple input files.
Added disk space check

Added code to check for diskspace before output