Fixed bug when assembling files without a final newline character