massively fix file encodings, trailing whitespaces and permissions