Create temporary swapfile in Ubuntu

From http://blog.goyalankit.com/2010/09/create-temporary-swap-file-in-ubuntu.html