Set encoding: utf-8 for scripts, fix ws errors, add swp to .gitignore