Python will eventually close open files, but it is recommended to
explicitly close them instead of waiting for the gc or program exit.
This fixes all the uses of open...read/write in the codebase, mostly in
tests.
Make sure that dotfiles are installed when not directly under /
Make sure / is not packaged in the rpm (it will cause a conflict with
the filesystem package).
Make sure that using destination="/" works
This adds empty __init__.py to tests so that a lib.py library of helper
functions can be imported from the tests.
Add captured_output to use with composer-cli tests to capture stdout/err
output from the functions.
(cherry picked from commit eeae331ba0)