Added newline at eof if respective Sublime settings is true

We found a bug where the EOF Sublime setting was not being respected, on save the EOF newline was being removed, and fixed by appending a \n if required.