Extract behaviour into new file and add a few new functions.
Remove output files. They aren't part of the project.
Script now detects headers and correctly ignores them when counting lines and re-adds them into the newly created partition files.