Write abort support

Split from #18.

Previously known as #2.

Original bug report: https://bugzilla.redhat.com/show_bug.cgi?id=857875