fix bakupdir exists error, and change file format from dos to unix