Fix bug with appending text content
Unit tests for TextFile class