work around a bug in Solaris by using pwrite instead of write; reported by michael.wookey at citrix.com.au svn:r118