Don't call fdopendir on unique_fd::get.

Transfer ownership by releasing first, instead of calling fdopendir on
unique_fd::get() and then releasing afterwards, to allow for strict
fd-ownership checks.

Test: treehugger
Change-Id: Idf8f107f8b6e4fc6bea03b9a9713d30b5c874f5a
1 file changed