Turn bytes to str before re.sub in test_compaction.py for python 3