treat $tmp as relative path, Fixes #4