cleanup wres code
add macro WRESIOERR for handling i/o errors
don't use WRESSEEK for getting file position, there is special handling for SEEK_SET and can be confusing