Revert "Delete temp files with ~ in the end."

This reverts commit 505670fbfb7aecf6016cf9efb1eabd3290cd6742.