strip newlines from tree entry names

ported from github.com
Merge branch 'tree-entry-newlines' of https://github.com/mojombo/grit into newlines
Version 2.6.2

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>