Fix exception
Unify usage of bob::core::tmpfile