Added check for disk space and swap

Hello,

I added a few things, I may add a few more later on please feel free to take a look, you may have to make a new unit test and example but the functions work and using them in a project of mine.