fix tests on osx

minor fixes to make it possible to run the tests on osx. 
tmp paths contain + characters, breaking regex asserts and test dir starts with /var/tmp