Remove whitespace from end of file