Add StandardOpenOption.TRUNCATE_EXISTING to textToFile() method

Fix for #129.