Added File.write, closes #171
File.writeLines now appends a trailing newline, closes #170