Add swap file management class

Tested fine on EL6.