refix line ending preservation. Closes #359

Signed-off-by: Chris Granger <ibdknox@gmail.com>