Issue #647, fix newline handling edge case.

@ethercrow in general I'm not sure what about the default behavior of tabs. Whenever I try to enter a tab character it gets expanded into spaces...but I was gonna save that issue until after I figure out this newline handling thing.