Fixed an error with 'beautify_buffer' where it would add extra lines.

Fix is hacky, but its functional, and tbh, I'm not entirely sure why the new lines are added, I just wanted to get it working.

Fixes Issue #23 Handle windows line endings