improve script stripping whitespace
rename rstrip
rm trailing: make sure one trailing newline exists