Implement basic functionality.

This commit implements the basic functionality required for this script
to run. Further checks can and should be implemented, for example
checking for two blank lines in a row.

Further changes might be necessary as well to enhance usability.