Fixed Python 2/3 compatibility annoyances with DictWriter.
Fixed issue where unit tests weren't creating directories.
Fixed issue where unit tests weren't creating directories.