Verify all files get closed when running File tests (#2299)
Verify all files get closed when running File tests (#2299)

This PR fixes 2 issues:

1) some tests never called dispose on files they opened, thereby, not
guaranteeing to close them.
2) some tests did call dispose but might encounter exceptions before the
dispose call that would prevent it from being called.

This PR changes the File package tests to use Pony's `with` blocks to
guarantee that `dispose` gets called on opened files.
ponylang/ponyc,sgebbie/ponyc,Theodus/ponyc,kulibali/ponyc,Theodus/ponyc,kulibali/ponyc,ponylang/ponyc,cquinn/ponyc,sgebbie/ponyc,jemc/ponyc,cquinn/ponyc,dipinhora/ponyc,cquinn/ponyc,dipinhora/ponyc,Praetonus/ponyc,sgebbie/ponyc,Praetonus/ponyc,CausalityLtd/ponyc,CausalityLtd/ponyc,ponylang/ponyc,kulibali/ponyc,Theodus/ponyc,sgebbie/ponyc,Theodus/ponyc,sgebbie/ponyc,Praetonus/ponyc,jemc/ponyc,Praetonus/ponyc,dipinhora/ponyc,Theodus/ponyc,cquinn/ponyc,jemc/ponyc,kulibali/ponyc,CausalityLtd/ponyc