Fix file handle leak in `ensureLineEndings`
Fix file handle leak in `ensureLineEndings`

Also improved the readability of that code a bit and gave it a better name.

nidrosianDeath/matlab2tikz,PeterPablo/matlab2tikz,egeerardyn/matlab2tikz,miscco/matlab2tikz,egeerardyn/matlab2tikz,matlab2tikz/matlab2tikz,matlab2tikz/matlab2tikz,LJeub/matlab2tikz,RPeschke/matlab2tikz