Memory check and creation of swap if necessary

For: https://github.com/snoyberg/keter/issues/20