fixed bug with lseek() return code interpretation when writing to
external blob files #49