Fix several issues in tests

- regex-escape file names for regex matching in tests (fixes three tests failing on Windows)
- add a missing pytest import to test_file_handler.py (fixes two failing tests)
- fix pickling errors in multiprocessing / subscriber group tests (two failing tests on windows)
- increase sleep time in zeromq background thread test (fails on win otherwise, on a fast machine)
- pep8/flake8 fixes for test files