Fixed issue #1057: Updated script to strip trailing whitespace.