handle no newline at eof better by adding one - fixes #17