Fix a TOCTOU and symlink attack in netd.

Bug: 7530471
Change-Id: I01fc79d647831dea903e4b852b874eb7bbed25fb
Fix a TOCTOU and symlink attack in netd.

Bug: 7530471
Change-Id: I3b0a38a203bdeba6c492a54fded056a16992e34e