* Fixed missing ACL when writing to a new file.
* Fix iRODS permissions when writing a file, by actually closing the
file upon end of stream.
* Other minor edits.