Add necessary newline and remove excess newline

Allow one newline on generated gemfile end
- Add necessary newline
- Remove excess newline