fix tests on osx, tmp paths contain + characters, breaking regex asserts and test dir starts with /var/tmp
Add explicit check to make sure that temp_file is an existing file
Merge pull request #125 from michaelheyvaert/fix-tests-osx

fix tests on osx