Unit Test Fix

Adds some fixes for unit test runner that was causing Blender to crash.