Fix file descriptor leak.
Fix file descriptor leak.

Summary:
If directory content stream is not closed explicitly, it can take a
long time for the GC to free those FDs, which can lead to OS running out of
them. This particular instance is not a huge deal, because it only happens on
exception, but still needs to be fixed.

Test Plan: CI

Reviewed By: philipjameson

fbshipit-source-id: 9cc26df

zpao/buck,romanoid/buck,shs96c/buck,JoelMarcey/buck,facebook/buck,LegNeato/buck,SeleniumHQ/buck,romanoid/buck,LegNeato/buck,Addepar/buck,Addepar/buck,romanoid/buck,brettwooldridge/buck,LegNeato/buck,facebook/buck,romanoid/buck,SeleniumHQ/buck,SeleniumHQ/buck,Addepar/buck,rmaz/buck,brettwooldridge/buck,rmaz/buck,facebook/buck,SeleniumHQ/buck,LegNeato/buck,LegNeato/buck,shs96c/buck,Addepar/buck,rmaz/buck,rmaz/buck,shs96c/buck,brettwooldridge/buck,nguyentruongtho/buck,SeleniumHQ/buck,romanoid/buck,LegNeato/buck,nguyentruongtho/buck,JoelMarcey/buck,JoelMarcey/buck,nguyentruongtho/buck,JoelMarcey/buck,SeleniumHQ/buck,Addepar/buck,LegNeato/buck,Addepar/buck,SeleniumHQ/buck,romanoid/buck,shs96c/buck,JoelMarcey/buck,kageiit/buck,brettwooldridge/buck,LegNeato/buck,shs96c/buck,romanoid/buck,rmaz/buck,LegNeato/buck,LegNeato/buck,LegNeato/buck,kageiit/buck,shs96c/buck,shs96c/buck,kageiit/buck,nguyentruongtho/buck,brettwooldridge/buck,nguyentruongtho/buck,zpao/buck,nguyentruongtho/buck,brettwooldridge/buck,shs96c/buck,rmaz/buck,zpao/buck,rmaz/buck,kageiit/buck,romanoid/buck,JoelMarcey/buck,shs96c/buck,JoelMarcey/buck,zpao/buck,JoelMarcey/buck,romanoid/buck,brettwooldridge/buck,rmaz/buck,Addepar/buck,rmaz/buck,romanoid/buck,SeleniumHQ/buck,Addepar/buck,JoelMarcey/buck,brettwooldridge/buck,rmaz/buck,brettwooldridge/buck,rmaz/buck,zpao/buck,kageiit/buck,romanoid/buck,JoelMarcey/buck,shs96c/buck,JoelMarcey/buck,zpao/buck,SeleniumHQ/buck,shs96c/buck,SeleniumHQ/buck,facebook/buck,zpao/buck,brettwooldridge/buck,Addepar/buck,romanoid/buck,rmaz/buck,JoelMarcey/buck,brettwooldridge/buck,SeleniumHQ/buck,Addepar/buck,SeleniumHQ/buck,rmaz/buck,Addepar/buck,shs96c/buck,Addepar/buck,brettwooldridge/buck,JoelMarcey/buck,kageiit/buck,facebook/buck,SeleniumHQ/buck,shs96c/buck,facebook/buck,romanoid/buck,brettwooldridge/buck,LegNeato/buck,facebook/buck,Addepar/buck,LegNeato/buck,nguyentruongtho/buck,kageiit/buck