fixes #2196 - create tmp/ if it doesn't exist