Add and fix tests to use correct tmp path