Mass edit of files with python