os: avoid panic when testing errors on Plan 9
os: avoid panic when testing errors on Plan 9

R=golang-dev, bradfitz, akumar
CC=golang-dev
http://codereview.appspot.com/6017043

h8liu/golang,h8liu/golang,h8liu/golang,h8liu/golang,h8liu/golang,h8liu/golang,h8liu/golang