os: return ErrInvalid if receiver is nil.
os: return ErrInvalid if receiver is nil.

Fixes issue 7043.

Test coming in https://codereview.appspot.com/46820043

R=r, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/38330045

tv42/old-go,pombredanne/go-deleteme,pombredanne/go-deleteme,tv42/old-go,tv42/old-go,tv42/old-go,tv42/old-go,tv42/old-go,pombredanne/go-deleteme,pombredanne/go-deleteme,pombredanne/go-deleteme,tv42/old-go,pombredanne/go-deleteme,pombredanne/go-deleteme