Refactoring: Use :delete and getline() instead of normal mode commands.

This is easier, and avoids the temp register in case of yank.
Only show :w hint when enabled.
Use new s:EchoErr() function instead of :echoerr.

The latter aborts script execution with an ugly multi-line message; the comments state that execution should continue with the next file.
Also silence the --No lines in buffer-- message.