Fix Issues #24 and #25

This is my pull request to fix issue #24 and #25.

Issue #24 was about changing the syntax `f = open(..)` to `with open(..) as f`

Issue #25 was about generating the `*.xls` files into their own subdirectory `tests/generated_files`


A bunch of `*_tests.py` have been affected but the non-test files that have been affected are:
```
document_writers.py
textwidths.py
```

All tests have passed as a result of these changes.