Remove excess newlines at the end of files