#347. Fixed tmppath with schemas

Patch with fix and test
Ah, I thought it was introduced in this path. Nevermind then :)