various updates for integration testing

- restructure tests in unit tests so they can be shared
- add integration_test.py
- tweak pylint
- restore dirname(), path_to_module() to host
- add write_tempfile_and_return_name() to host