[bug] Don't concatenate lines of two files

* Fixed a bug where the last line of a file and the first
   line of the next file could be concatenated when there was
   no trailing or leading newlines
* Added option to turn on debugging and made a supersimple
  debug function