Manage swap file.

Store swap file in a special directory and add a new function to remove all swap file of the directory.