Check errno, not the result of symlink(), for EEXIST.

Resolves #1305.