Python script that detects textfiles and then removes trailing white spaces and more.