Strip trailing from invalid line output

As discovered by @ruffy91 in https://github.com/graphite-project/carbon/pull/38#issuecomment-54471965.